<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<script type="text/javascript">
function formCheck() {
	var flag = false;//id 중복관련 전송여부 (true : 전송불가, false : 전송)
	
	var form = window.document.menuform;
	if (!form.menuId.value) {
		alert("아이디를 넣으세요");
		form.menuId.focus();
		return false;
	}
	if (flag) {
		alert("사용할 수 없는 ID 입니다. ");
		form.menuId.focus();
		return false;
	}
	if (!form.menuName.value) {
		alert("이름를 넣으세요");
		form.menuName.focus();
		return false;
	}
	if (!form.menuPrice.value) {
		alert("가격을 넣으세요");
		form.menuPrice.focus();
		return false;
	}
}

</script>


	<h2>메뉴 입력</h2>
	<hr>
	<form name="menuform" action="/hansot/menuRegister.do" onsubmit="return formCheck()" >
		<table>
			<tr>
				<td align="center">메뉴ID :</td>
				<td><input type="text" name="menuId" onkeyup="menuidCheck();" id="menuId" /></td>
			</tr>
			<tr>
				<td align="center">메뉴이름 :</td>
				<td><input type="text" name="menuName" id="menuName"></td>
			</tr>
			<tr>
				<td align="center">메뉴가격 :</td>
				<td><input type="text" name="menuPrice" id="menuPrice"></td>
			</tr>
			<tr>
				<td align="center">이미지 주소 :</td>
				<td><input type="file" name="imgLocation" id="imgLocation"></td>
			</tr>			
			<tr>
				<td align="center">category_id :</td>
				<td><select name="categoryId">
							<option value="category-01" selected="selected">category-01</option>
							<option value="category-02">category-02</option>
							<option value="category-03">category-03</option>
							<option value="category-04">category-04</option>
							<option value="category-05">category-05</option>
							<option value="category-06">category-06</option>
							<option value="category-07">category-07</option>
							<option value="category-08">category-08</option>
						</select></td>
			</tr>
			<tr>
				<td align="center">제품설명 :</td>
				<td><input type="text" name="explanation" id="explanation"></td>
			</tr>
			<tr>
				<td colspan="2" align="center"><input type="submit" value="등록" />
					<input type="reset" value="재입력"/></td>
			</tr>
		</table>
	</form>

